<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Test::More - yet another framework for writing test scripts - Perldoc Browser</title>
    <link rel="search" href="https://perldoc.perl.org/opensearch.xml" type="application/opensearchdescription+xml" title="Perldoc Browser">
    <link rel="canonical" href="https://perldoc.perl.org/Test::More">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/stackoverflow-light.min.css" integrity="sha512-cG1IdFxqipi3gqLmksLtuk13C+hBa57a6zpWxMeoY3Q9O6ooFxq50DayCdm0QrDgZjMUn23z/0PMZlgft7Yp5Q==" crossorigin="anonymous" />
    <style>
      body {
        background: #f4f4f5;
        color: #020202;
      }
      .navbar-dark {
        background-image: -webkit-linear-gradient(top, #005f85 0, #002e49 100%);
        background-image: -o-linear-gradient(top, #005f85 0, #002e49 100%);
        background-image: linear-gradient(to bottom, #005f85 0, #002e49 100%);
        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff005f85', endColorstr='#ff002e49', GradientType=0);
        background-repeat: repeat-x;
      }
      .navbar-dark .navbar-nav .nav-link,
      .navbar-dark .navbar-nav .nav-link:focus { color: #fff }
      .navbar-dark .navbar-nav .nav-link:hover { color: #ffef68 }
      #wrapperlicious {
        margin: 0 auto;
        font: 0.9em 'Helvetica Neue', Helvetica, sans-serif;
        font-weight: normal;
        line-height: 1.5em;
        margin: 0;
        padding: 0;
      }
      #wrapperlicious h1 { font-size: 1.5em }
      #wrapperlicious h2 { font-size: 1.3em }
      #wrapperlicious h3 { font-size: 1.1em }
      #wrapperlicious h4 { font-size: 0.9em }
      #wrapperlicious h1, #wrapperlicious h2, #wrapperlicious h3,
      #wrapperlicious h4, #wrapperlicious dt {
        color: #020202;
        margin-top: 1em;
        margin-bottom: 1em;
        position: relative;
        font-weight: bold;
      }
      #wrapperlicious a { color: inherit; text-decoration: underline }
      #wrapperlicious #toc { text-decoration: none }
      #wrapperlicious a:hover { color: #2a2a2a }
      #wrapperlicious a img { border: 0 }
      #wrapperlicious :not(pre) > code {
        color: inherit;
        background-color: rgba(0, 0, 0, 0.04);
        border-radius: 3px;
        font: 0.9em Consolas, Menlo, Monaco, monospace;
        padding: 0.3em;
      }
      #wrapperlicious dd {
        margin: 0;
        margin-left: 2em;
      }
      #wrapperlicious dt {
        color: #2a2a2a;
        font-weight: bold;
        margin-left: 0.9em;
      }
      #wrapperlicious p {
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious li > p {
        margin-bottom: 0;
        margin-top: 0;
      }
      #wrapperlicious pre {
        border: 1px solid #c1c1c1;
        border-radius: 3px;
        font: 100% Consolas, Menlo, Monaco, monospace;
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious pre > code {
        display: block;
        background-color: #f6f6f6;
        font: 0.9em Consolas, Menlo, Monaco, monospace;
        line-height: 1.5em;
        text-align: left;
        white-space: pre;
        padding: 1em;
      }
      #wrapperlicious dl, #wrapperlicious ol, #wrapperlicious ul {
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious ul {
        list-style-type: square;
      }
      #wrapperlicious ul ul {
        margin-bottom: 0px;
        margin-top: 0px;
      }
      #footer {
        font-size: 0.8em;
        padding-top: 0.5em;
        text-align: center;
      }
      #more {
        display: inline;
        font-size: 0.8em;
      }
      #perldocdiv {
        background-color: #fff;
        border: 1px solid #c1c1c1;
        border-bottom-left-radius: 5px;
        border-bottom-right-radius: 5px;
        margin-left: auto;
        margin-right: auto;
        padding: 3em;
        padding-top: 1em;
        max-width: 960px;
      }
      #moduleversion { float: right }
      #wrapperlicious .leading-notice {
        font-style: italic;
        padding-left: 1em;
        margin-top: 1em;
        margin-bottom: 1em;
      }
      #wrapperlicious .permalink {
        display: none;
        left: -0.75em;
        position: absolute;
        padding-right: 0.25em;
        text-decoration: none;
      }
      #wrapperlicious h1:hover .permalink, #wrapperlicious h2:hover .permalink,
      #wrapperlicious h3:hover .permalink, #wrapperlicious h4:hover .permalink,
      #wrapperlicious dt:hover .permalink {
        display: block;
      }
    </style>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-KVNWBNT5FB"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

      gtag('config', 'G-KVNWBNT5FB');
      gtag('config', 'UA-50555-3');
    </script>
  </head>
  <body>
    <nav class="navbar navbar-expand-md navbar-dark bg-dark justify-content-between">
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>
  <a class="navbar-brand" href="https://perldoc.perl.org/">Perldoc Browser</a>
  <div class="collapse navbar-collapse" id="navbarNav">
    <ul class="navbar-nav mr-auto">
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="./Test::More.html#" id="dropdownlink-stable" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">5.35.0</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-stable">
          <a class="dropdown-item" href="https://perldoc.perl.org/Test::More">Latest</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.2/Test::More">5.38.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.1/Test::More">5.38.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0/Test::More">5.38.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.3/Test::More">5.36.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.2/Test::More">5.36.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.1/Test::More">5.36.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.0/Test::More">5.36.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.3/Test::More">5.34.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.2/Test::More">5.34.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.1/Test::More">5.34.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.0/Test::More">5.34.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.32.1/Test::More">5.32.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.32.0/Test::More">5.32.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.3/Test::More">5.30.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.2/Test::More">5.30.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.1/Test::More">5.30.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.0/Test::More">5.30.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.3/Test::More">5.28.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.2/Test::More">5.28.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.1/Test::More">5.28.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.0/Test::More">5.28.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.3/Test::More">5.26.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.2/Test::More">5.26.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.1/Test::More">5.26.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.0/Test::More">5.26.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.4/Test::More">5.24.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.3/Test::More">5.24.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.2/Test::More">5.24.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.1/Test::More">5.24.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.0/Test::More">5.24.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.4/Test::More">5.22.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.3/Test::More">5.22.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.2/Test::More">5.22.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.1/Test::More">5.22.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.0/Test::More">5.22.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.3/Test::More">5.20.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.2/Test::More">5.20.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.1/Test::More">5.20.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.0/Test::More">5.20.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.4/Test::More">5.18.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.3/Test::More">5.18.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.2/Test::More">5.18.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.1/Test::More">5.18.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.0/Test::More">5.18.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.3/Test::More">5.16.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.2/Test::More">5.16.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.1/Test::More">5.16.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.0/Test::More">5.16.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.4/Test::More">5.14.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.3/Test::More">5.14.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.2/Test::More">5.14.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.1/Test::More">5.14.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.0/Test::More">5.14.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.5/Test::More">5.12.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.4/Test::More">5.12.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.3/Test::More">5.12.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.2/Test::More">5.12.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.1/Test::More">5.12.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.0/Test::More">5.12.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.10.1/Test::More">5.10.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.10.0/Test::More">5.10.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.9/Test::More">5.8.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.8/Test::More">5.8.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.7/Test::More">5.8.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.6/Test::More">5.8.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.5/Test::More">5.8.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.4/Test::More">5.8.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.3/Test::More">5.8.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.2/Test::More">5.8.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.1/Test::More">5.8.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.0/Test::More">5.8.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.2/Test::More">5.6.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.1/Test::More">5.6.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.0/Test::More">5.6.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_04/Test::More">5.005_04</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_03/Test::More">5.005_03</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_02/Test::More">5.005_02</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_01/Test::More">5.005_01</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005/Test::More">5.005</a>
        </div>
      </li>
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="./Test::More.html#" id="dropdownlink-dev" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dev</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-dev">
          <a class="dropdown-item" href="https://perldoc.perl.org/blead/Test::More">blead</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.6/Test::More">5.39.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.5/Test::More">5.39.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.4/Test::More">5.39.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.3/Test::More">5.39.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.2/Test::More">5.39.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.1/Test::More">5.39.1</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0-RC2/Test::More">5.38.0-RC2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0-RC1/Test::More">5.38.0-RC1</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.11/Test::More">5.37.11</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.10/Test::More">5.37.10</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.9/Test::More">5.37.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.8/Test::More">5.37.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.7/Test::More">5.37.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.6/Test::More">5.37.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.5/Test::More">5.37.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.4/Test::More">5.37.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.3/Test::More">5.37.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.2/Test::More">5.37.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.1/Test::More">5.37.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.0/Test::More">5.37.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.11/Test::More">5.35.11</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.10/Test::More">5.35.10</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.9/Test::More">5.35.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.8/Test::More">5.35.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.7/Test::More">5.35.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.6/Test::More">5.35.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.5/Test::More">5.35.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.4/Test::More">5.35.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.3/Test::More">5.35.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.2/Test::More">5.35.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.1/Test::More">5.35.1</a>
          <a class="dropdown-item active" href="./Test::More.html">5.35.0</a>
        </div>
      </li>
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="./Test::More.html#" id="dropdownlink-nav" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Documentation</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-nav">
          <a class="dropdown-item" href="perl.html">Perl</a>
          <a class="dropdown-item" href="perlintro.html">Intro</a>
          <a class="dropdown-item" href="perl.html#Tutorials">Tutorials</a>
          <a class="dropdown-item" href="perlfaq.html">FAQs</a>
          <a class="dropdown-item" href="perl.html#Reference-Manual">Reference</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="perlop.html">Operators</a>
          <a class="dropdown-item" href="functions.html">Functions</a>
          <a class="dropdown-item" href="variables.html">Variables</a>
          <a class="dropdown-item" href="modules.html">Modules</a>
          <a class="dropdown-item" href="perlutil.html">Utilities</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="perlcommunity.html">Community</a>
          <a class="dropdown-item" href="perlhist.html">History</a>
        </div>
      </li>
    </ul>
    <ul class="navbar-nav">
      <script>
        function set_expand (expand) {
          var perldocdiv = document.getElementById('perldocdiv');
          var width = window.getComputedStyle(perldocdiv).getPropertyValue('max-width');
          var expanded = (width == '' || width == 'none') ? true : false;
          if (expand === null) {
            expand = !expanded;
          }
          if ((expand && !expanded) || (!expand && expanded)) {
            perldocdiv.style.setProperty('max-width', expand ? 'none' : '960px');
            var button_classlist = document.getElementById('content-expand-button').classList;
            if (expand) {
              button_classlist.add('btn-light');
              button_classlist.remove('btn-outline-light');
            } else {
              button_classlist.add('btn-outline-light');
              button_classlist.remove('btn-light');
            }
          }
          return expand;
        }
        function toggle_expand () {
          var expand = set_expand(null);
          document.cookie = 'perldoc_expand=' + (expand ? 1 : 0) + '; path=/; expires=Tue, 19 Jan 2038 03:14:07 UTC';
        }
        function read_expand () {
          return document.cookie.split(';').some(function (item) { return item.indexOf('perldoc_expand=1') >= 0 });
        }
        if (document.readyState === 'loading') {
          document.addEventListener('DOMContentLoaded', function () {
            if (read_expand()) {
              set_expand(true);
            }
          });
        } else if (read_expand()) {
          set_expand(true);
        }
      </script>
      <button id="content-expand-button" type="button" class="btn btn-outline-light d-none d-lg-inline-block mr-2" onclick="toggle_expand()">Expand</button>
    <ul>
    <form class="form-inline" method="get" action="https://perldoc.perl.org/5.35.0/search">
      <input class="form-control mr-3" type="search" name="q" placeholder="Search" aria-label="Search">
    </form>
  </div>
</nav>

    <div id="wrapperlicious" class="container-fluid">
      <div id="perldocdiv">
        <div id="links">
          <a href="./Test::More.html">Test::More</a>
          <div id="more">
            (<a href="./Test::More.txt">source</a>,
            <a href="https://metacpan.org/pod/Test::More">CPAN</a>)
          </div>
            <div id="moduleversion">version 1.302183</div>
        </div>
        <div class="leading-notice">
          You are viewing the version of this documentation from Perl 5.35.0.
            This is a development version of Perl.
        </div>
        <h1><a id="toc">CONTENTS</a></h1>
                  <ul>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#NAME">NAME</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#SYNOPSIS">SYNOPSIS</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#DESCRIPTION">DESCRIPTION</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#I-love-it-when-a-plan-comes-together">I love it when a plan comes together</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#Test-names">Test names</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#I&#39;m-ok,-you&#39;re-not-ok.">I&#39;m ok, you&#39;re not ok.</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#Module-tests">Module tests</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#Complex-data-structures">Complex data structures</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#Diagnostics">Diagnostics</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#Conditional-tests">Conditional tests</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#Test-control">Test control</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#Discouraged-comparison-functions">Discouraged comparison functions</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#Extending-and-Embedding-Test::More">Extending and Embedding Test::More</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#EXIT-CODES">EXIT CODES</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#COMPATIBILITY">COMPATIBILITY</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#CAVEATS-and-NOTES">CAVEATS and NOTES</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#HISTORY">HISTORY</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#SEE-ALSO">SEE ALSO</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#"></a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#ALTERNATIVES">ALTERNATIVES</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#ADDITIONAL-LIBRARIES">ADDITIONAL LIBRARIES</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#OTHER-COMPONENTS">OTHER COMPONENTS</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#BUNDLES">BUNDLES</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#AUTHORS">AUTHORS</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#MAINTAINERS">MAINTAINERS</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#BUGS">BUGS</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#SOURCE">SOURCE</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Test::More.html#COPYRIGHT">COPYRIGHT</a>
              </li>
          </ul>

      <h1 id="NAME"><a class="permalink" href="./Test::More.html#NAME">#</a>NAME</h1>

<p>Test::More - yet another framework for writing test scripts</p>

<h1 id="SYNOPSIS"><a class="permalink" href="./Test::More.html#SYNOPSIS">#</a>SYNOPSIS</h1>

<pre><code>use Test::More tests =&gt; 23;
# or
use Test::More skip_all =&gt; $reason;
# or
use Test::More;   # see done_testing()

require_ok( &#39;Some::Module&#39; );

# Various ways to say &quot;ok&quot;
ok($got eq $expected, $test_name);

is  ($got, $expected, $test_name);
isnt($got, $expected, $test_name);

# Rather than print STDERR &quot;# here&#39;s what went wrong\n&quot;
diag(&quot;here&#39;s what went wrong&quot;);

like  ($got, qr/expected/, $test_name);
unlike($got, qr/expected/, $test_name);

cmp_ok($got, &#39;==&#39;, $expected, $test_name);

is_deeply($got_complex_structure, $expected_complex_structure, $test_name);

SKIP: {
    skip $why, $how_many unless $have_some_feature;

    ok( foo(),       $test_name );
    is( foo(42), 23, $test_name );
};

TODO: {
    local $TODO = $why;

    ok( foo(),       $test_name );
    is( foo(42), 23, $test_name );
};

can_ok($module, @methods);
isa_ok($object, $class);

pass($test_name);
fail($test_name);

BAIL_OUT($why);

# UNIMPLEMENTED!!!
my @status = Test::More::status;</code></pre>

<h1 id="DESCRIPTION"><a class="permalink" href="./Test::More.html#DESCRIPTION">#</a>DESCRIPTION</h1>

<p><b>STOP!</b> If you&#39;re just getting started writing tests, have a look at <a href="./Test2::Suite.html">Test2::Suite</a> first.</p>

<p>This is a drop in replacement for Test::Simple which you can switch to once you get the hang of basic testing.</p>

<p>The purpose of this module is to provide a wide range of testing utilities. Various ways to say &quot;ok&quot; with better diagnostics, facilities to skip tests, test future features and compare complicated data structures. While you can do almost anything with a simple <code>ok()</code> function, it doesn&#39;t provide good diagnostic output.</p>

<h2 id="I-love-it-when-a-plan-comes-together"><a class="permalink" href="./Test::More.html#I-love-it-when-a-plan-comes-together">#</a><a id="I"></a>I love it when a plan comes together</h2>

<p>Before anything else, you need a testing plan. This basically declares how many tests your script is going to run to protect against premature failure.</p>

<p>The preferred way to do this is to declare a plan when you <code>use Test::More</code>.</p>

<pre><code>use Test::More tests =&gt; 23;</code></pre>

<p>There are cases when you will not know beforehand how many tests your script is going to run. In this case, you can declare your tests at the end.</p>

<pre><code>use Test::More;

... run your tests ...

done_testing( $number_of_tests_run );</code></pre>

<p><b>NOTE</b> <code>done_testing()</code> should never be called in an <code>END { ... }</code> block.</p>

<p>Sometimes you really don&#39;t know how many tests were run, or it&#39;s too difficult to calculate. In which case you can leave off $number_of_tests_run.</p>

<p>In some cases, you&#39;ll want to completely skip an entire testing script.</p>

<pre><code>use Test::More skip_all =&gt; $skip_reason;</code></pre>

<p>Your script will declare a skip with the reason why you skipped and exit immediately with a zero (success). See <a href="./Test::Harness.html">Test::Harness</a> for details.</p>

<p>If you want to control what functions Test::More will export, you have to use the &#39;import&#39; option. For example, to import everything but &#39;fail&#39;, you&#39;d do:</p>

<pre><code>use Test::More tests =&gt; 23, import =&gt; [&#39;!fail&#39;];</code></pre>

<p>Alternatively, you can use the <code>plan()</code> function. Useful for when you have to calculate the number of tests.</p>

<pre><code>use Test::More;
plan tests =&gt; keys %Stuff * 3;</code></pre>

<p>or for deciding between running the tests at all:</p>

<pre><code>use Test::More;
if( $^O eq &#39;MacOS&#39; ) {
    plan skip_all =&gt; &#39;Test irrelevant on MacOS&#39;;
}
else {
    plan tests =&gt; 42;
}</code></pre>

<dl>

<dt id="done_testing"><a class="permalink" href="./Test::More.html#done_testing">#</a><b>done_testing</b></dt>
<dd>

<pre><code>done_testing();
done_testing($number_of_tests);</code></pre>

<p>If you don&#39;t know how many tests you&#39;re going to run, you can issue the plan when you&#39;re done running tests.</p>

<p>$number_of_tests is the same as <code>plan()</code>, it&#39;s the number of tests you expected to run. You can omit this, in which case the number of tests you ran doesn&#39;t matter, just the fact that your tests ran to conclusion.</p>

<p>This is safer than and replaces the &quot;no_plan&quot; plan.</p>

<p><b>Note:</b> You must never put <code>done_testing()</code> inside an <code>END { ... }</code> block. The plan is there to ensure your test does not exit before testing has completed. If you use an END block you completely bypass this protection.</p>

</dd>
</dl>

<h2 id="Test-names"><a class="permalink" href="./Test::More.html#Test-names">#</a><a id="Test"></a>Test names</h2>

<p>By convention, each test is assigned a number in order. This is largely done automatically for you. However, it&#39;s often very useful to assign a name to each test. Which would you rather see:</p>

<pre><code class="plaintext">ok 4
not ok 5
ok 6</code></pre>

<p>or</p>

<pre><code class="plaintext">ok 4 - basic multi-variable
not ok 5 - simple exponential
ok 6 - force == mass * acceleration</code></pre>

<p>The later gives you some idea of what failed. It also makes it easier to find the test in your script, simply search for &quot;simple exponential&quot;.</p>

<p>All test functions take a name argument. It&#39;s optional, but highly suggested that you use it.</p>

<h2 id="I&#39;m-ok,-you&#39;re-not-ok."><a class="permalink" href="./Test::More.html#I&#39;m-ok,-you&#39;re-not-ok.">#</a><a id="I1"></a><a id="Im-ok-youre-not-ok"></a>I&#39;m ok, you&#39;re not ok.</h2>

<p>The basic purpose of this module is to print out either &quot;ok #&quot; or &quot;not ok #&quot; depending on if a given test succeeded or failed. Everything else is just gravy.</p>

<p>All of the following print &quot;ok&quot; or &quot;not ok&quot; depending on if the test succeeded or failed. They all also return true or false, respectively.</p>

<dl>

<dt id="ok"><a class="permalink" href="./Test::More.html#ok">#</a><b>ok</b></dt>
<dd>

<pre><code>ok($got eq $expected, $test_name);</code></pre>

<p>This simply evaluates any expression (<code>$got eq $expected</code> is just a simple example) and uses that to determine if the test succeeded or failed. A true expression passes, a false one fails. Very simple.</p>

<p>For example:</p>

<pre><code>ok( $exp{9} == 81,                   &#39;simple exponential&#39; );
ok( Film-&gt;can(&#39;db_Main&#39;),            &#39;set_db()&#39; );
ok( $p-&gt;tests == 4,                  &#39;saw tests&#39; );
ok( !grep(!defined $_, @items),      &#39;all items defined&#39; );</code></pre>

<p>(Mnemonic: &quot;This is ok.&quot;)</p>

<p>$test_name is a very short description of the test that will be printed out. It makes it very easy to find a test in your script when it fails and gives others an idea of your intentions. $test_name is optional, but we <b>very</b> strongly encourage its use.</p>

<p>Should an <code>ok()</code> fail, it will produce some diagnostics:</p>

<pre><code class="plaintext">not ok 18 - sufficient mucus
#   Failed test &#39;sufficient mucus&#39;
#   in foo.t at line 42.</code></pre>

<p>This is the same as <a href="./Test::Simple.html">Test::Simple</a>&#39;s <code>ok()</code> routine.</p>

</dd>
<dt id="is"><a class="permalink" href="./Test::More.html#is">#</a><b>is</b></dt>
<dd>

</dd>
<dt id="isnt"><a class="permalink" href="./Test::More.html#isnt">#</a><b>isnt</b></dt>
<dd>

<pre><code>is  ( $got, $expected, $test_name );
isnt( $got, $expected, $test_name );</code></pre>

<p>Similar to <code>ok()</code>, <code>is()</code> and <code>isnt()</code> compare their two arguments with <code>eq</code> and <code>ne</code> respectively and use the result of that to determine if the test succeeded or failed. So these:</p>

<pre><code># Is the ultimate answer 42?
is( ultimate_answer(), 42,          &quot;Meaning of Life&quot; );

# $foo isn&#39;t empty
isnt( $foo, &#39;&#39;,     &quot;Got some foo&quot; );</code></pre>

<p>are similar to these:</p>

<pre><code>ok( ultimate_answer() eq 42,        &quot;Meaning of Life&quot; );
ok( $foo ne &#39;&#39;,     &quot;Got some foo&quot; );</code></pre>

<p><code>undef</code> will only ever match <code>undef</code>. So you can test a value against <code>undef</code> like this:</p>

<pre><code>is($not_defined, undef, &quot;undefined as expected&quot;);</code></pre>

<p>(Mnemonic: &quot;This is that.&quot; &quot;This isn&#39;t that.&quot;)</p>

<p>So why use these? They produce better diagnostics on failure. <code>ok()</code> cannot know what you are testing for (beyond the name), but <code>is()</code> and <code>isnt()</code> know what the test was and why it failed. For example this test:</p>

<pre><code>my $foo = &#39;waffle&#39;;  my $bar = &#39;yarblokos&#39;;
is( $foo, $bar,   &#39;Is foo the same as bar?&#39; );</code></pre>

<p>Will produce something like this:</p>

<pre><code class="plaintext">not ok 17 - Is foo the same as bar?
#   Failed test &#39;Is foo the same as bar?&#39;
#   in foo.t at line 139.
#          got: &#39;waffle&#39;
#     expected: &#39;yarblokos&#39;</code></pre>

<p>So you can figure out what went wrong without rerunning the test.</p>

<p>You are encouraged to use <code>is()</code> and <code>isnt()</code> over <code>ok()</code> where possible, however do not be tempted to use them to find out if something is true or false!</p>

<pre><code># XXX BAD!
is( exists $brooklyn{tree}, 1, &#39;A tree grows in Brooklyn&#39; );</code></pre>

<p>This does not check if <code>exists $brooklyn{tree}</code> is true, it checks if it returns 1. Very different. Similar caveats exist for false and 0. In these cases, use <code>ok()</code>.</p>

<pre><code>ok( exists $brooklyn{tree},    &#39;A tree grows in Brooklyn&#39; );</code></pre>

<p>A simple call to <code>isnt()</code> usually does not provide a strong test but there are cases when you cannot say much more about a value than that it is different from some other value:</p>

<pre><code>new_ok $obj, &quot;Foo&quot;;

my $clone = $obj-&gt;clone;
isa_ok $obj, &quot;Foo&quot;, &quot;Foo-&gt;clone&quot;;

isnt $obj, $clone, &quot;clone() produces a different object&quot;;</code></pre>

<p>For those grammatical pedants out there, there&#39;s an <code>isn&#39;t()</code> function which is an alias of <code>isnt()</code>.</p>

</dd>
<dt id="like"><a class="permalink" href="./Test::More.html#like">#</a><b>like</b></dt>
<dd>

<pre><code>like( $got, qr/expected/, $test_name );</code></pre>

<p>Similar to <code>ok()</code>, <code>like()</code> matches $got against the regex <code>qr/expected/</code>.</p>

<p>So this:</p>

<pre><code>like($got, qr/expected/, &#39;this is like that&#39;);</code></pre>

<p>is similar to:</p>

<pre><code>ok( $got =~ m/expected/, &#39;this is like that&#39;);</code></pre>

<p>(Mnemonic &quot;This is like that&quot;.)</p>

<p>The second argument is a regular expression. It may be given as a regex reference (i.e. <code>qr//</code>) or (for better compatibility with older perls) as a string that looks like a regex (alternative delimiters are currently not supported):</p>

<pre><code>like( $got, &#39;/expected/&#39;, &#39;this is like that&#39; );</code></pre>

<p>Regex options may be placed on the end (<code>&#39;/expected/i&#39;</code>).</p>

<p>Its advantages over <code>ok()</code> are similar to that of <code>is()</code> and <code>isnt()</code>. Better diagnostics on failure.</p>

</dd>
<dt id="unlike"><a class="permalink" href="./Test::More.html#unlike">#</a><b>unlike</b></dt>
<dd>

<pre><code>unlike( $got, qr/expected/, $test_name );</code></pre>

<p>Works exactly as <code>like()</code>, only it checks if $got <b>does not</b> match the given pattern.</p>

</dd>
<dt id="cmp_ok"><a class="permalink" href="./Test::More.html#cmp_ok">#</a><b>cmp_ok</b></dt>
<dd>

<pre><code>cmp_ok( $got, $op, $expected, $test_name );</code></pre>

<p>Halfway between <code>ok()</code> and <code>is()</code> lies <code>cmp_ok()</code>. This allows you to compare two arguments using any binary perl operator. The test passes if the comparison is true and fails otherwise.</p>

<pre><code># ok( $got eq $expected );
cmp_ok( $got, &#39;eq&#39;, $expected, &#39;this eq that&#39; );

# ok( $got == $expected );
cmp_ok( $got, &#39;==&#39;, $expected, &#39;this == that&#39; );

# ok( $got &amp;&amp; $expected );
cmp_ok( $got, &#39;&amp;&amp;&#39;, $expected, &#39;this &amp;&amp; that&#39; );
...etc...</code></pre>

<p>Its advantage over <code>ok()</code> is when the test fails you&#39;ll know what $got and $expected were:</p>

<pre><code class="plaintext">not ok 1
#   Failed test in foo.t at line 12.
#     &#39;23&#39;
#         &amp;&amp;
#     undef</code></pre>

<p>It&#39;s also useful in those cases where you are comparing numbers and <code>is()</code>&#39;s use of <code>eq</code> will interfere:</p>

<pre><code>cmp_ok( $big_hairy_number, &#39;==&#39;, $another_big_hairy_number );</code></pre>

<p>It&#39;s especially useful when comparing greater-than or smaller-than relation between values:</p>

<pre><code>cmp_ok( $some_value, &#39;&lt;=&#39;, $upper_limit );</code></pre>

</dd>
<dt id="can_ok"><a class="permalink" href="./Test::More.html#can_ok">#</a><b>can_ok</b></dt>
<dd>

<pre><code>can_ok($module, @methods);
can_ok($object, @methods);</code></pre>

<p>Checks to make sure the $module or $object can do these @methods (works with functions, too).</p>

<pre><code>can_ok(&#39;Foo&#39;, qw(this that whatever));</code></pre>

<p>is almost exactly like saying:</p>

<pre><code>ok( Foo-&gt;can(&#39;this&#39;) &amp;&amp; 
    Foo-&gt;can(&#39;that&#39;) &amp;&amp; 
    Foo-&gt;can(&#39;whatever&#39;) 
  );</code></pre>

<p>only without all the typing and with a better interface. Handy for quickly testing an interface.</p>

<p>No matter how many @methods you check, a single <code>can_ok()</code> call counts as one test. If you desire otherwise, use:</p>

<pre><code>foreach my $meth (@methods) {
    can_ok(&#39;Foo&#39;, $meth);
}</code></pre>

</dd>
<dt id="isa_ok"><a class="permalink" href="./Test::More.html#isa_ok">#</a><b>isa_ok</b></dt>
<dd>

<pre><code>isa_ok($object,   $class, $object_name);
isa_ok($subclass, $class, $object_name);
isa_ok($ref,      $type,  $ref_name);</code></pre>

<p>Checks to see if the given <code>$object-&gt;isa($class)</code>. Also checks to make sure the object was defined in the first place. Handy for this sort of thing:</p>

<pre><code>my $obj = Some::Module-&gt;new;
isa_ok( $obj, &#39;Some::Module&#39; );</code></pre>

<p>where you&#39;d otherwise have to write</p>

<pre><code>my $obj = Some::Module-&gt;new;
ok( defined $obj &amp;&amp; $obj-&gt;isa(&#39;Some::Module&#39;) );</code></pre>

<p>to safeguard against your test script blowing up.</p>

<p>You can also test a class, to make sure that it has the right ancestor:</p>

<pre><code>isa_ok( &#39;Vole&#39;, &#39;Rodent&#39; );</code></pre>

<p>It works on references, too:</p>

<pre><code>isa_ok( $array_ref, &#39;ARRAY&#39; );</code></pre>

<p>The diagnostics of this test normally just refer to &#39;the object&#39;. If you&#39;d like them to be more specific, you can supply an $object_name (for example &#39;Test customer&#39;).</p>

</dd>
<dt id="new_ok"><a class="permalink" href="./Test::More.html#new_ok">#</a><b>new_ok</b></dt>
<dd>

<pre><code>my $obj = new_ok( $class );
my $obj = new_ok( $class =&gt; \@args );
my $obj = new_ok( $class =&gt; \@args, $object_name );</code></pre>

<p>A convenience function which combines creating an object and calling <code>isa_ok()</code> on that object.</p>

<p>It is basically equivalent to:</p>

<pre><code>my $obj = $class-&gt;new(@args);
isa_ok $obj, $class, $object_name;</code></pre>

<p>If @args is not given, an empty list will be used.</p>

<p>This function only works on <code>new()</code> and it assumes <code>new()</code> will return just a single object which isa <code>$class</code>.</p>

</dd>
<dt id="subtest"><a class="permalink" href="./Test::More.html#subtest">#</a><b>subtest</b></dt>
<dd>

<pre><code>subtest $name =&gt; \&amp;code, @args;</code></pre>

<p><code>subtest()</code> runs the &amp;code as its own little test with its own plan and its own result. The main test counts this as a single test using the result of the whole subtest to determine if its ok or not ok.</p>

<p>For example...</p>

<pre><code> use Test::More tests =&gt; 3;

 pass(&quot;First test&quot;);

 subtest &#39;An example subtest&#39; =&gt; sub {
     plan tests =&gt; 2;

     pass(&quot;This is a subtest&quot;);
     pass(&quot;So is this&quot;);
 };

 pass(&quot;Third test&quot;);</code></pre>

<p>This would produce.</p>

<pre><code class="plaintext">1..3
ok 1 - First test
    # Subtest: An example subtest
    1..2
    ok 1 - This is a subtest
    ok 2 - So is this
ok 2 - An example subtest
ok 3 - Third test</code></pre>

<p>A subtest may call <code>skip_all</code>. No tests will be run, but the subtest is considered a skip.</p>

<pre><code>subtest &#39;skippy&#39; =&gt; sub {
    plan skip_all =&gt; &#39;cuz I said so&#39;;
    pass(&#39;this test will never be run&#39;);
};</code></pre>

<p>Returns true if the subtest passed, false otherwise.</p>

<p>Due to how subtests work, you may omit a plan if you desire. This adds an implicit <code>done_testing()</code> to the end of your subtest. The following two subtests are equivalent:</p>

<pre><code>subtest &#39;subtest with implicit done_testing()&#39;, sub {
    ok 1, &#39;subtests with an implicit done testing should work&#39;;
    ok 1, &#39;... and support more than one test&#39;;
    ok 1, &#39;... no matter how many tests are run&#39;;
};

subtest &#39;subtest with explicit done_testing()&#39;, sub {
    ok 1, &#39;subtests with an explicit done testing should work&#39;;
    ok 1, &#39;... and support more than one test&#39;;
    ok 1, &#39;... no matter how many tests are run&#39;;
    done_testing();
};</code></pre>

<p>Extra arguments given to <code>subtest</code> are passed to the callback. For example:</p>

<pre><code>sub my_subtest {
    my $range = shift;
    ...
}

for my $range (1, 10, 100, 1000) {
    subtest &quot;testing range $range&quot;, \&amp;my_subtest, $range;
}</code></pre>

</dd>
<dt id="pass"><a class="permalink" href="./Test::More.html#pass">#</a><b>pass</b></dt>
<dd>

</dd>
<dt id="fail"><a class="permalink" href="./Test::More.html#fail">#</a><b>fail</b></dt>
<dd>

<pre><code>pass($test_name);
fail($test_name);</code></pre>

<p>Sometimes you just want to say that the tests have passed. Usually the case is you&#39;ve got some complicated condition that is difficult to wedge into an <code>ok()</code>. In this case, you can simply use <code>pass()</code> (to declare the test ok) or fail (for not ok). They are synonyms for <code>ok(1)</code> and <code>ok(0)</code>.</p>

<p>Use these very, very, very sparingly.</p>

</dd>
</dl>

<h2 id="Module-tests"><a class="permalink" href="./Test::More.html#Module-tests">#</a><a id="Module"></a>Module tests</h2>

<p>Sometimes you want to test if a module, or a list of modules, can successfully load. For example, you&#39;ll often want a first test which simply loads all the modules in the distribution to make sure they work before going on to do more complicated testing.</p>

<p>For such purposes we have <code>use_ok</code> and <code>require_ok</code>.</p>

<dl>

<dt id="require_ok"><a class="permalink" href="./Test::More.html#require_ok">#</a><b>require_ok</b></dt>
<dd>

<pre><code>require_ok($module);
require_ok($file);</code></pre>

<p>Tries to <code>require</code> the given $module or $file. If it loads successfully, the test will pass. Otherwise it fails and displays the load error.</p>

<p><code>require_ok</code> will guess whether the input is a module name or a filename.</p>

<p>No exception will be thrown if the load fails.</p>

<pre><code># require Some::Module
require_ok &quot;Some::Module&quot;;

# require &quot;Some/File.pl&quot;;
require_ok &quot;Some/File.pl&quot;;

# stop testing if any of your modules will not load
for my $module (@module) {
    require_ok $module or BAIL_OUT &quot;Can&#39;t load $module&quot;;
}</code></pre>

</dd>
<dt id="use_ok"><a class="permalink" href="./Test::More.html#use_ok">#</a><b>use_ok</b></dt>
<dd>

<pre><code>BEGIN { use_ok($module); }
BEGIN { use_ok($module, @imports); }</code></pre>

<p>Like <code>require_ok</code>, but it will <code>use</code> the $module in question and only loads modules, not files.</p>

<p>If you just want to test a module can be loaded, use <code>require_ok</code>.</p>

<p>If you just want to load a module in a test, we recommend simply using <code>use</code> directly. It will cause the test to stop.</p>

<p>It&#39;s recommended that you run <code>use_ok()</code> inside a BEGIN block so its functions are exported at compile-time and prototypes are properly honored.</p>

<p>If @imports are given, they are passed through to the use. So this:</p>

<pre><code class="plaintext">BEGIN { use_ok(&#39;Some::Module&#39;, qw(foo bar)) }</code></pre>

<p>is like doing this:</p>

<pre><code>use Some::Module qw(foo bar);</code></pre>

<p>Version numbers can be checked like so:</p>

<pre><code class="plaintext"># Just like &quot;use Some::Module 1.02&quot;
BEGIN { use_ok(&#39;Some::Module&#39;, 1.02) }</code></pre>

<p>Don&#39;t try to do this:</p>

<pre><code>BEGIN {
    use_ok(&#39;Some::Module&#39;);

    ...some code that depends on the use...
    ...happening at compile time...
}</code></pre>

<p>because the notion of &quot;compile-time&quot; is relative. Instead, you want:</p>

<pre><code class="plaintext">BEGIN { use_ok(&#39;Some::Module&#39;) }
BEGIN { ...some code that depends on the use... }</code></pre>

<p>If you want the equivalent of <code>use Foo ()</code>, use a module but not import anything, use <code>require_ok</code>.</p>

<pre><code class="plaintext">BEGIN { require_ok &quot;Foo&quot; }</code></pre>

</dd>
</dl>

<h2 id="Complex-data-structures"><a class="permalink" href="./Test::More.html#Complex-data-structures">#</a><a id="Complex"></a>Complex data structures</h2>

<p>Not everything is a simple eq check or regex. There are times you need to see if two data structures are equivalent. For these instances Test::More provides a handful of useful functions.</p>

<p><b>NOTE</b> I&#39;m not quite sure what will happen with filehandles.</p>

<dl>

<dt id="is_deeply"><a class="permalink" href="./Test::More.html#is_deeply">#</a><b>is_deeply</b></dt>
<dd>

<pre><code>is_deeply( $got, $expected, $test_name );</code></pre>

<p>Similar to <code>is()</code>, except that if $got and $expected are references, it does a deep comparison walking each data structure to see if they are equivalent. If the two structures are different, it will display the place where they start differing.</p>

<p><code>is_deeply()</code> compares the dereferenced values of references, the references themselves (except for their type) are ignored. This means aspects such as blessing and ties are not considered &quot;different&quot;.</p>

<p><code>is_deeply()</code> currently has very limited handling of function reference and globs. It merely checks if they have the same referent. This may improve in the future.</p>

<p><a href="./Test::Differences.html">Test::Differences</a> and <a href="./Test::Deep.html">Test::Deep</a> provide more in-depth functionality along these lines.</p>

<p><b>NOTE</b> is_deeply() has limitations when it comes to comparing strings and refs:</p>

<pre><code>my $path = path(&#39;.&#39;);
my $hash = {};
is_deeply( $path, &quot;$path&quot; ); # ok
is_deeply( $hash, &quot;$hash&quot; ); # fail</code></pre>

<p>This happens because is_deeply will unoverload all arguments unconditionally. It is probably best not to use is_deeply with overloading. For legacy reasons this is not likely to ever be fixed. If you would like a much better tool for this you should see <a href="./Test2::Suite.html">Test2::Suite</a> Specifically <a href="./Test2::Tools::Compare.html">Test2::Tools::Compare</a> has an <code>is()</code> function that works like <code>is_deeply</code> with many improvements.</p>

</dd>
</dl>

<h2 id="Diagnostics"><a class="permalink" href="./Test::More.html#Diagnostics">#</a>Diagnostics</h2>

<p>If you pick the right test function, you&#39;ll usually get a good idea of what went wrong when it failed. But sometimes it doesn&#39;t work out that way. So here we have ways for you to write your own diagnostic messages which are safer than just <code>print STDERR</code>.</p>

<dl>

<dt id="diag"><a class="permalink" href="./Test::More.html#diag">#</a><b>diag</b></dt>
<dd>

<pre><code>diag(@diagnostic_message);</code></pre>

<p>Prints a diagnostic message which is guaranteed not to interfere with test output. Like <code>print</code> @diagnostic_message is simply concatenated together.</p>

<p>Returns false, so as to preserve failure.</p>

<p>Handy for this sort of thing:</p>

<pre><code>ok( grep(/foo/, @users), &quot;There&#39;s a foo user&quot; ) or
    diag(&quot;Since there&#39;s no foo, check that /etc/bar is set up right&quot;);</code></pre>

<p>which would produce:</p>

<pre><code class="plaintext">not ok 42 - There&#39;s a foo user
#   Failed test &#39;There&#39;s a foo user&#39;
#   in foo.t at line 52.
# Since there&#39;s no foo, check that /etc/bar is set up right.</code></pre>

<p>You might remember <code>ok() or diag()</code> with the mnemonic <code>open() or die()</code>.</p>

<p><b>NOTE</b> The exact formatting of the diagnostic output is still changing, but it is guaranteed that whatever you throw at it won&#39;t interfere with the test.</p>

</dd>
<dt id="note"><a class="permalink" href="./Test::More.html#note">#</a><b>note</b></dt>
<dd>

<pre><code>note(@diagnostic_message);</code></pre>

<p>Like <code>diag()</code>, except the message will not be seen when the test is run in a harness. It will only be visible in the verbose TAP stream.</p>

<p>Handy for putting in notes which might be useful for debugging, but don&#39;t indicate a problem.</p>

<pre><code>note(&quot;Tempfile is $tempfile&quot;);</code></pre>

</dd>
<dt id="explain"><a class="permalink" href="./Test::More.html#explain">#</a><b>explain</b></dt>
<dd>

<pre><code>my @dump = explain @diagnostic_message;</code></pre>

<p>Will dump the contents of any references in a human readable format. Usually you want to pass this into <code>note</code> or <code>diag</code>.</p>

<p>Handy for things like...</p>

<pre><code>is_deeply($have, $want) || diag explain $have;</code></pre>

<p>or</p>

<pre><code>note explain \%args;
Some::Class-&gt;method(%args);</code></pre>

</dd>
</dl>

<h2 id="Conditional-tests"><a class="permalink" href="./Test::More.html#Conditional-tests">#</a><a id="Conditional"></a>Conditional tests</h2>

<p>Sometimes running a test under certain conditions will cause the test script to die. A certain function or method isn&#39;t implemented (such as <code>fork()</code> on MacOS), some resource isn&#39;t available (like a net connection) or a module isn&#39;t available. In these cases it&#39;s necessary to skip tests, or declare that they are supposed to fail but will work in the future (a todo test).</p>

<p>For more details on the mechanics of skip and todo tests see <a href="./Test::Harness.html">Test::Harness</a>.</p>

<p>The way Test::More handles this is with a named block. Basically, a block of tests which can be skipped over or made todo. It&#39;s best if I just show you...</p>

<dl>

<dt id="SKIP:-BLOCK"><a class="permalink" href="./Test::More.html#SKIP:-BLOCK">#</a><a id="SKIP"></a><b>SKIP: BLOCK</b></dt>
<dd>

<pre><code>SKIP: {
    skip $why, $how_many if $condition;

    ...normal testing code goes here...
}</code></pre>

<p>This declares a block of tests that might be skipped, $how_many tests there are, $why and under what $condition to skip them. An example is the easiest way to illustrate:</p>

<pre><code>SKIP: {
    eval { require HTML::Lint };

    skip &quot;HTML::Lint not installed&quot;, 2 if $@;

    my $lint = new HTML::Lint;
    isa_ok( $lint, &quot;HTML::Lint&quot; );

    $lint-&gt;parse( $html );
    is( $lint-&gt;errors, 0, &quot;No errors found in HTML&quot; );
}</code></pre>

<p>If the user does not have HTML::Lint installed, the whole block of code <i>won&#39;t be run at all</i>. Test::More will output special ok&#39;s which Test::Harness interprets as skipped, but passing, tests.</p>

<p>It&#39;s important that $how_many accurately reflects the number of tests in the SKIP block so the # of tests run will match up with your plan. If your plan is <code>no_plan</code> $how_many is optional and will default to 1.</p>

<p>It&#39;s perfectly safe to nest SKIP blocks. Each SKIP block must have the label <code>SKIP</code>, or Test::More can&#39;t work its magic.</p>

<p>You don&#39;t skip tests which are failing because there&#39;s a bug in your program, or for which you don&#39;t yet have code written. For that you use TODO. Read on.</p>

</dd>
<dt id="TODO:-BLOCK"><a class="permalink" href="./Test::More.html#TODO:-BLOCK">#</a><a id="TODO"></a><b>TODO: BLOCK</b></dt>
<dd>

<pre><code>TODO: {
    local $TODO = $why if $condition;

    ...normal testing code goes here...
}</code></pre>

<p>Declares a block of tests you expect to fail and $why. Perhaps it&#39;s because you haven&#39;t fixed a bug or haven&#39;t finished a new feature:</p>

<pre><code>TODO: {
    local $TODO = &quot;URI::Geller not finished&quot;;

    my $card = &quot;Eight of clubs&quot;;
    is( URI::Geller-&gt;your_card, $card, &#39;Is THIS your card?&#39; );

    my $spoon;
    URI::Geller-&gt;bend_spoon;
    is( $spoon, &#39;bent&#39;,    &quot;Spoon bending, that&#39;s original&quot; );
}</code></pre>

<p>With a todo block, the tests inside are expected to fail. Test::More will run the tests normally, but print out special flags indicating they are &quot;todo&quot;. <a href="./Test::Harness.html">Test::Harness</a> will interpret failures as being ok. Should anything succeed, it will report it as an unexpected success. You then know the thing you had todo is done and can remove the TODO flag.</p>

<p>The nice part about todo tests, as opposed to simply commenting out a block of tests, is that it is like having a programmatic todo list. You know how much work is left to be done, you&#39;re aware of what bugs there are, and you&#39;ll know immediately when they&#39;re fixed.</p>

<p>Once a todo test starts succeeding, simply move it outside the block. When the block is empty, delete it.</p>

</dd>
<dt id="todo_skip"><a class="permalink" href="./Test::More.html#todo_skip">#</a><b>todo_skip</b></dt>
<dd>

<pre><code>TODO: {
    todo_skip $why, $how_many if $condition;

    ...normal testing code...
}</code></pre>

<p>With todo tests, it&#39;s best to have the tests actually run. That way you&#39;ll know when they start passing. Sometimes this isn&#39;t possible. Often a failing test will cause the whole program to die or hang, even inside an <code>eval BLOCK</code> with and using <code>alarm</code>. In these extreme cases you have no choice but to skip over the broken tests entirely.</p>

<p>The syntax and behavior is similar to a <code>SKIP: BLOCK</code> except the tests will be marked as failing but todo. <a href="./Test::Harness.html">Test::Harness</a> will interpret them as passing.</p>

</dd>
<dt id="When-do-I-use-SKIP-vs.-TODO?"><a class="permalink" href="./Test::More.html#When-do-I-use-SKIP-vs.-TODO?">#</a><a id="When"></a><a id="When-do-I-use-SKIP-vs.-TODO"></a>When do I use SKIP vs. TODO?</dt>
<dd>

<p><b>If it&#39;s something the user might not be able to do</b>, use SKIP. This includes optional modules that aren&#39;t installed, running under an OS that doesn&#39;t have some feature (like <code>fork()</code> or symlinks), or maybe you need an Internet connection and one isn&#39;t available.</p>

<p><b>If it&#39;s something the programmer hasn&#39;t done yet</b>, use TODO. This is for any code you haven&#39;t written yet, or bugs you have yet to fix, but want to put tests in your testing script (always a good idea).</p>

</dd>
</dl>

<h2 id="Test-control"><a class="permalink" href="./Test::More.html#Test-control">#</a><a id="Test1"></a>Test control</h2>

<dl>

<dt id="BAIL_OUT"><a class="permalink" href="./Test::More.html#BAIL_OUT">#</a><b>BAIL_OUT</b></dt>
<dd>

<pre><code>BAIL_OUT($reason);</code></pre>

<p>Indicates to the harness that things are going so badly all testing should terminate. This includes the running of any additional test scripts.</p>

<p>This is typically used when testing cannot continue such as a critical module failing to compile or a necessary external utility not being available such as a database connection failing.</p>

<p>The test will exit with 255.</p>

<p>For even better control look at <a href="./Test::Most.html">Test::Most</a>.</p>

</dd>
</dl>

<h2 id="Discouraged-comparison-functions"><a class="permalink" href="./Test::More.html#Discouraged-comparison-functions">#</a><a id="Discouraged"></a>Discouraged comparison functions</h2>

<p>The use of the following functions is discouraged as they are not actually testing functions and produce no diagnostics to help figure out what went wrong. They were written before <code>is_deeply()</code> existed because I couldn&#39;t figure out how to display a useful diff of two arbitrary data structures.</p>

<p>These functions are usually used inside an <code>ok()</code>.</p>

<pre><code>ok( eq_array(\@got, \@expected) );</code></pre>

<p><code>is_deeply()</code> can do that better and with diagnostics.</p>

<pre><code>is_deeply( \@got, \@expected );</code></pre>

<p>They may be deprecated in future versions.</p>

<dl>

<dt id="eq_array"><a class="permalink" href="./Test::More.html#eq_array">#</a><b>eq_array</b></dt>
<dd>

<pre><code>my $is_eq = eq_array(\@got, \@expected);</code></pre>

<p>Checks if two arrays are equivalent. This is a deep check, so multi-level structures are handled correctly.</p>

</dd>
<dt id="eq_hash"><a class="permalink" href="./Test::More.html#eq_hash">#</a><b>eq_hash</b></dt>
<dd>

<pre><code>my $is_eq = eq_hash(\%got, \%expected);</code></pre>

<p>Determines if the two hashes contain the same keys and values. This is a deep check.</p>

</dd>
<dt id="eq_set"><a class="permalink" href="./Test::More.html#eq_set">#</a><b>eq_set</b></dt>
<dd>

<pre><code>my $is_eq = eq_set(\@got, \@expected);</code></pre>

<p>Similar to <code>eq_array()</code>, except the order of the elements is <b>not</b> important. This is a deep check, but the irrelevancy of order only applies to the top level.</p>

<pre><code>ok( eq_set(\@got, \@expected) );</code></pre>

<p>Is better written:</p>

<pre><code>is_deeply( [sort @got], [sort @expected] );</code></pre>

<p><b>NOTE</b> By historical accident, this is not a true set comparison. While the order of elements does not matter, duplicate elements do.</p>

<p><b>NOTE</b> <code>eq_set()</code> does not know how to deal with references at the top level. The following is an example of a comparison which might not work:</p>

<pre><code>eq_set([\1, \2], [\2, \1]);</code></pre>

<p><a href="./Test::Deep.html">Test::Deep</a> contains much better set comparison functions.</p>

</dd>
</dl>

<h2 id="Extending-and-Embedding-Test::More"><a class="permalink" href="./Test::More.html#Extending-and-Embedding-Test::More">#</a><a id="Extending"></a>Extending and Embedding Test::More</h2>

<p>Sometimes the Test::More interface isn&#39;t quite enough. Fortunately, Test::More is built on top of <a href="./Test::Builder.html">Test::Builder</a> which provides a single, unified backend for any test library to use. This means two test libraries which both use &lt;Test::Builder&gt; <b>can</b> be used together in the same program&gt;.</p>

<p>If you simply want to do a little tweaking of how the tests behave, you can access the underlying <a href="./Test::Builder.html">Test::Builder</a> object like so:</p>

<dl>

<dt id="builder"><a class="permalink" href="./Test::More.html#builder">#</a><b>builder</b></dt>
<dd>

<pre><code>my $test_builder = Test::More-&gt;builder;</code></pre>

<p>Returns the <a href="./Test::Builder.html">Test::Builder</a> object underlying Test::More for you to play with.</p>

</dd>
</dl>

<h1 id="EXIT-CODES"><a class="permalink" href="./Test::More.html#EXIT-CODES">#</a><a id="EXIT"></a>EXIT CODES</h1>

<p>If all your tests passed, <a href="./Test::Builder.html">Test::Builder</a> will exit with zero (which is normal). If anything failed it will exit with how many failed. If you run less (or more) tests than you planned, the missing (or extras) will be considered failures. If no tests were ever run <a href="./Test::Builder.html">Test::Builder</a> will throw a warning and exit with 255. If the test died, even after having successfully completed all its tests, it will still be considered a failure and will exit with 255.</p>

<p>So the exit codes are...</p>

<pre><code class="plaintext">0                   all tests successful
255                 test died or all passed but wrong # of tests run
any other number    how many failed (including missing or extras)</code></pre>

<p>If you fail more than 254 tests, it will be reported as 254.</p>

<p><b>NOTE</b> This behavior may go away in future versions.</p>

<h1 id="COMPATIBILITY"><a class="permalink" href="./Test::More.html#COMPATIBILITY">#</a>COMPATIBILITY</h1>

<p>Test::More works with Perls as old as 5.8.1.</p>

<p>Thread support is not very reliable before 5.10.1, but that&#39;s because threads are not very reliable before 5.10.1.</p>

<p>Although Test::More has been a core module in versions of Perl since 5.6.2, Test::More has evolved since then, and not all of the features you&#39;re used to will be present in the shipped version of Test::More. If you are writing a module, don&#39;t forget to indicate in your package metadata the minimum version of Test::More that you require. For instance, if you want to use <code>done_testing()</code> but want your test script to run on Perl 5.10.0, you will need to explicitly require Test::More &gt; 0.88.</p>

<p>Key feature milestones include:</p>

<dl>

<dt id="subtests"><a class="permalink" href="./Test::More.html#subtests">#</a>subtests</dt>
<dd>

<p>Subtests were released in Test::More 0.94, which came with Perl 5.12.0. Subtests did not implicitly call <code>done_testing()</code> until 0.96; the first Perl with that fix was Perl 5.14.0 with 0.98.</p>

</dd>
<dt id="done_testing()"><a class="permalink" href="./Test::More.html#done_testing()">#</a><a id="done_testing1"></a><code>done_testing()</code></dt>
<dd>

<p>This was released in Test::More 0.88 and first shipped with Perl in 5.10.1 as part of Test::More 0.92.</p>

</dd>
<dt id="cmp_ok()"><a class="permalink" href="./Test::More.html#cmp_ok()">#</a><a id="cmp_ok1"></a><code>cmp_ok()</code></dt>
<dd>

<p>Although <code>cmp_ok()</code> was introduced in 0.40, 0.86 fixed an important bug to make it safe for overloaded objects; the fixed first shipped with Perl in 5.10.1 as part of Test::More 0.92.</p>

</dd>
<dt id="new_ok()-note()-and-explain()"><a class="permalink" href="./Test::More.html#new_ok()-note()-and-explain()">#</a><a id="new_ok1"></a><a id="new_ok-note-and-explain"></a><code>new_ok()</code> <code>note()</code> and <code>explain()</code></dt>
<dd>

<p>These were was released in Test::More 0.82, and first shipped with Perl in 5.10.1 as part of Test::More 0.92.</p>

</dd>
</dl>

<p>There is a full version history in the Changes file, and the Test::More versions included as core can be found using <a href="./Module::CoreList.html">Module::CoreList</a>:</p>

<pre><code class="plaintext">$ corelist -a Test::More</code></pre>

<h1 id="CAVEATS-and-NOTES"><a class="permalink" href="./Test::More.html#CAVEATS-and-NOTES">#</a><a id="CAVEATS"></a>CAVEATS and NOTES</h1>

<dl>

<dt id="utf8-/-&quot;Wide-character-in-print&quot;"><a class="permalink" href="./Test::More.html#utf8-/-%22Wide-character-in-print%22">#</a><a id="utf8"></a><a id="utf8-Wide-character-in-print"></a>utf8 / &quot;Wide character in print&quot;</dt>
<dd>

<p>If you use utf8 or other non-ASCII characters with Test::More you might get a &quot;Wide character in print&quot; warning. Using <code>binmode STDOUT, &quot;:utf8&quot;</code> will not fix it. <a href="./Test::Builder.html">Test::Builder</a> (which powers Test::More) duplicates STDOUT and STDERR. So any changes to them, including changing their output disciplines, will not be seen by Test::More.</p>

<p>One work around is to apply encodings to STDOUT and STDERR as early as possible and before Test::More (or any other Test module) loads.</p>

<pre><code>use open &#39;:std&#39;, &#39;:encoding(utf8)&#39;;
use Test::More;</code></pre>

<p>A more direct work around is to change the filehandles used by <a href="./Test::Builder.html">Test::Builder</a>.</p>

<pre><code>my $builder = Test::More-&gt;builder;
binmode $builder-&gt;output,         &quot;:encoding(utf8)&quot;;
binmode $builder-&gt;failure_output, &quot;:encoding(utf8)&quot;;
binmode $builder-&gt;todo_output,    &quot;:encoding(utf8)&quot;;</code></pre>

</dd>
<dt id="Overloaded-objects"><a class="permalink" href="./Test::More.html#Overloaded-objects">#</a><a id="Overloaded"></a>Overloaded objects</dt>
<dd>

<p>String overloaded objects are compared <b>as strings</b> (or in <code>cmp_ok()</code>&#39;s case, strings or numbers as appropriate to the comparison op). This prevents Test::More from piercing an object&#39;s interface allowing better blackbox testing. So if a function starts returning overloaded objects instead of bare strings your tests won&#39;t notice the difference. This is good.</p>

<p>However, it does mean that functions like <code>is_deeply()</code> cannot be used to test the internals of string overloaded objects. In this case I would suggest <a href="./Test::Deep.html">Test::Deep</a> which contains more flexible testing functions for complex data structures.</p>

</dd>
<dt id="Threads"><a class="permalink" href="./Test::More.html#Threads">#</a>Threads</dt>
<dd>

<p>Test::More will only be aware of threads if <code>use threads</code> has been done <i>before</i> Test::More is loaded. This is ok:</p>

<pre><code>use threads;
use Test::More;</code></pre>

<p>This may cause problems:</p>

<pre><code>use Test::More
use threads;</code></pre>

<p>5.8.1 and above are supported. Anything below that has too many bugs.</p>

</dd>
</dl>

<h1 id="HISTORY"><a class="permalink" href="./Test::More.html#HISTORY">#</a>HISTORY</h1>

<p>This is a case of convergent evolution with Joshua Pritikin&#39;s <a href="Test.html">Test</a> module. I was largely unaware of its existence when I&#39;d first written my own <code>ok()</code> routines. This module exists because I can&#39;t figure out how to easily wedge test names into Test&#39;s interface (along with a few other problems).</p>

<p>The goal here is to have a testing utility that&#39;s simple to learn, quick to use and difficult to trip yourself up with while still providing more flexibility than the existing Test.pm. As such, the names of the most common routines are kept tiny, special cases and magic side-effects are kept to a minimum. WYSIWYG.</p>

<h1 id="SEE-ALSO"><a class="permalink" href="./Test::More.html#SEE-ALSO">#</a><a id="SEE"></a>SEE ALSO</h1>

<h2 id=""><a class="permalink" href="./Test::More.html#">#</a></h2>

<h2 id="ALTERNATIVES"><a class="permalink" href="./Test::More.html#ALTERNATIVES">#</a>ALTERNATIVES</h2>

<p><a href="./Test2::Suite.html">Test2::Suite</a> is the most recent and modern set of tools for testing.</p>

<p><a href="./Test::Simple.html">Test::Simple</a> if all this confuses you and you just want to write some tests. You can upgrade to Test::More later (it&#39;s forward compatible).</p>

<p><a href="./Test::Legacy.html">Test::Legacy</a> tests written with Test.pm, the original testing module, do not play well with other testing libraries. Test::Legacy emulates the Test.pm interface and does play well with others.</p>

<h2 id="ADDITIONAL-LIBRARIES"><a class="permalink" href="./Test::More.html#ADDITIONAL-LIBRARIES">#</a><a id="ADDITIONAL"></a>ADDITIONAL LIBRARIES</h2>

<p><a href="./Test::Differences.html">Test::Differences</a> for more ways to test complex data structures. And it plays well with Test::More.</p>

<p><a href="./Test::Class.html">Test::Class</a> is like xUnit but more perlish.</p>

<p><a href="./Test::Deep.html">Test::Deep</a> gives you more powerful complex data structure testing.</p>

<p><a href="./Test::Inline.html">Test::Inline</a> shows the idea of embedded testing.</p>

<p><a href="./Mock::Quick.html">Mock::Quick</a> The ultimate mocking library. Easily spawn objects defined on the fly. Can also override, block, or reimplement packages as needed.</p>

<p><a href="./Test::FixtureBuilder.html">Test::FixtureBuilder</a> Quickly define fixture data for unit tests.</p>

<h2 id="OTHER-COMPONENTS"><a class="permalink" href="./Test::More.html#OTHER-COMPONENTS">#</a><a id="OTHER"></a>OTHER COMPONENTS</h2>

<p><a href="./Test::Harness.html">Test::Harness</a> is the test runner and output interpreter for Perl. It&#39;s the thing that powers <code>make test</code> and where the <code>prove</code> utility comes from.</p>

<h2 id="BUNDLES"><a class="permalink" href="./Test::More.html#BUNDLES">#</a>BUNDLES</h2>

<p><a href="./Test::Most.html">Test::Most</a> Most commonly needed test functions and features.</p>

<h1 id="AUTHORS"><a class="permalink" href="./Test::More.html#AUTHORS">#</a>AUTHORS</h1>

<p>Michael G Schwern &lt;schwern@pobox.com&gt; with much inspiration from Joshua Pritikin&#39;s Test module and lots of help from Barrie Slaymaker, Tony Bowden, blackstar.co.uk, chromatic, Fergal Daly and the perl-qa gang.</p>

<h1 id="MAINTAINERS"><a class="permalink" href="./Test::More.html#MAINTAINERS">#</a>MAINTAINERS</h1>

<dl>

<dt id="Chad-Granum"><a class="permalink" href="./Test::More.html#Chad-Granum">#</a><a id="Chad-Granum-&lt;exodist@cpan.org&gt;"></a><a id="Chad"></a><a id="Chad-Granum-exodist-cpan.org"></a>Chad Granum &lt;exodist@cpan.org&gt;</dt>
<dd>

</dd>
</dl>

<h1 id="BUGS"><a class="permalink" href="./Test::More.html#BUGS">#</a>BUGS</h1>

<p>See <i>https://github.com/Test-More/test-more/issues</i> to report and view bugs.</p>

<h1 id="SOURCE"><a class="permalink" href="./Test::More.html#SOURCE">#</a>SOURCE</h1>

<p>The source code repository for Test::More can be found at <i>http://github.com/Test-More/test-more/</i>.</p>

<h1 id="COPYRIGHT"><a class="permalink" href="./Test::More.html#COPYRIGHT">#</a>COPYRIGHT</h1>

<p>Copyright 2001-2008 by Michael G Schwern &lt;schwern@pobox.com&gt;.</p>

<p>This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.</p>

<p>See <i>http://www.perl.com/perl/misc/Artistic.html</i></p>


      </div>
      <div id="footer">
        <p>Perldoc Browser is maintained by Dan Book (<a href="https://metacpan.org/author/DBOOK">DBOOK</a>). Please contact him via the <a href="https://github.com/Grinnz/perldoc-browser/issues">GitHub issue tracker</a> or <a href="mailto:dbook@cpan.org">email</a> regarding any issues with the site itself, search, or rendering of documentation.</p>

<p>The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via the <a href="https://github.com/Perl/perl5/issues">Perl issue tracker</a>, the <a href="https://lists.perl.org/list/perl5-porters.html">mailing list</a>, or <a href="https://kiwiirc.com/client/irc.perl.org/p5p">IRC</a> to report any issues with the contents or format of the documentation.</p>


      </div>
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.slim.min.js" integrity="sha512-/DXTXr6nQodMUiq+IUJYCt2PPOUjrHJ9wFrqpJ3XkgPNOZVfMok7cRw6CSxyCQxXn6ozlESsSh1/sMCTF1rL/g==" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.1/umd/popper.min.js" integrity="sha512-ubuT8Z88WxezgSqf3RLuNi5lmjstiJcyezx34yIU2gAHonIi27Na7atqzUZCOoY4CExaoFumzOsFQ2Ch+I/HCw==" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
    <script src="../highlight.pack.js"></script>
    <script>hljs.highlightAll();</script>
  </body>
</html>
